1. Technical Field
The invention relates to use of channel programs for the control of data transfer between input/output devices in a data processing system and more particularly to synchronization of channel programs in a data processing system. The invention relates still more particularly to synchronization of channel programs controlling transfer of data from a source input/output device to main storage and from main storage to a destination input/output device without central processing unit intervention.
2. Description of the Related Art
Contemporary mainframe computer architecture is well exemplified by the ESA/390 system manufactured by International Business Machines Corporation. In the ESA/390 system, and its ancestors, data is entered to the computer from input devices such as telecommunication network interfaces, keyboards, tape drives and disk drives. Data is output by the system to printers, communication networks, visual displays and mass storage devices such as disk drives and tape drives. Collectively the sources and destinations of data are known as input/output (I/O) devices. A detailed description of the features of the ESA/390 system may be found in a handbook entitled "Enterprise Systems Architecture/390 Principles of Operation", First Edition, (IBM Corporation, October 1990).
The terms "input" and "output" refer to the transfer of data between an I/O device and main storage for the computer. Contemporary mainframe computer architecture uses an input operation between the main storage and a source I/O device and a subsequent output operation between the main storage and a destination I/O device to move data between I/O devices. Between input and output the data is stored in main storage. The input and output operations are controlled by separate read and write channel programs.
Some operations, such as back up of records, copying of the contents of a disk drive to tape storage, or distribution of video from an optical disk to a network, do not require the computer central processing unit ("CPU") for modification or operation on the data. In such cases, main storage then serves as a buffer for data being moved or copied from a source I/O device to a destination I/O device. Transfer of the data between the two I/O devices requires an input operation and an output operation.
For a number of reasons, using the central processing unit to handle input and output operations is an inefficient use of CPU processing capability. Dedicated processors and associated facilities have long been used to handle most aspects of I/O operation and to remove these functions from the central processing unit. In the IBM ESA/390, the ESA/370 and 370-XA systems, these facilities are provided by a channel subsystem. I/O devices and their control units attach to the channel subsystem. This arrangement has advantages beyond relieving the CPU of the more time consuming aspects of input and output management. For example, I/O operations are made substantially transparent to programs executing on the CPU. Thus programmers need not concern themselves with features of particular I/O devices. More importantly, the CPU can continue to execute program instructions and operations during an I/O operation.
A channel subsystem includes a plurality of control structures called subchannels. A subchannel provides the logical appearance of an I/O device to a program executing on a CPU. A subchannel provides internal storage of a channel command word (CCW) address, a channel path identifier, a device number, and various status indications among other items. Subchannels respond to instructions from the CPU and support execution of channel command words stored in main storage by the CPU. A channel command word specifies a command to be executed and, for commands initiating certain I/O operations, it designates an area in main storage associated with the operation and the action to be taken whenever transfer to or from the area is completed, among other options.
A channel program is a logical sequence of channel command words which a channel subsystem retrieves in order of the sequence. The sequence is specified by the CPU. The location of the first CCW in a sequence is designated within the operand of a Start Subchannel instruction issued by a CPU to the subchannel and channel subsystem processor.
Notwithstanding the general desirability of removing execution of channel programs from the CPUs, CPU intervention in the execution of the channel programs was provided by the prior art for various purposes. For example, the Suspend function, when used in conjunction with the Resume Subchannel instruction, provides the possibility of stopping and starting a channel program with CPU involvement. In the ESA/390 system, the suspend function is enabled by setting an operand within a Start Subchannel instruction. When during execution of a channel program a suspend flag set in a Channel Command Word is encountered, processing is suspended. The program executing on the CPU may thereafter modify the channel command word which caused the suspension to remove the suspend flag. The CPU may then signal the subchannel with the Resume Subchannel instruction causing reexecution of the same channel command word.
Coupling of subchannels for the transfer of unmodified data from one I/O device to another I/O device has been done by using two subchannels, each separately programmed to handle one aspect of the transfer. One subchannel is programmed to handle the input operation and one channel is programmed to handle the output operation. A CPU coordinates the respective input (read) and output (write) channel programs. As a read channel program executes it completes loading of a block of data from an I/O device into main storage. A suspend flag is then encountered. The channel subsystem executing the input program then issues an I/O interrupt to the CPU. In response to the interrupt, the CPU issues a Start Subchannel instruction to a Write Subchannel programmed to execute the coupled write channel program. This subchannel works with the same area of main storage just used by the Read program. The Write channel program is written to present a suspend flag after the data in the area of storage has been moved. Again an interrupt is issued to the CPU, which modifies the appropriate data areas and issues the appropriate instruction to cause the input operation to resume execution. Execution of the channel programs alternates by repeated issuance of I/O interrupts and resultant CPU generation of I/O instructions until both channel programs are completed.
Where the number of cycles between the channel programs is great, heavy use of the CPU is required to coordinate alternating execution of subchannels. This can be expensive. As demands for handling high-bandwidth environments are presented to a data processing system, such as digital video transmission, the chance for loss of data or transmission delay increases. Voice and video transmission must be isochronous and bandwidth must be guaranteed to avoid distracting jitter upon reproduction. This is very difficult to achieve if CPU involvement in the process is frequently required, due to competition for CPU processing cycles.